public class demo {
    public static void main(String[] args) {
        int[] array = new int[10];
        for (int i = 0; i <array.length ; i++) {
            System.out.print(array[i]+" ");
        }
        System.out.println();
        int[] array1 ={1,2,3,4,5,6};
        for (int i = 0; i <array1.length ; i++) {
            System.out.print(array1[i]+" ");
        }
        System.out.println();
        //也可以使用 for-each 遍历数组
        int[] array2 = {1, 2, 3};
        for (int x : array2) {
            System.out.print(x+" ");
        }
    }
}

